sil-openclaw 0.3.8 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -10,6 +10,122 @@ release (`clawhub package publish --changelog`). See [README](./README.md#releas
10
10
 
11
11
  ## [Unreleased]
12
12
 
13
+ ## [0.4.0] - 2026-07-13
14
+
15
+ ### Changed
16
+
17
+ - **Spec-Driven Shopping rebuilt around a frontmatter-as-truth store and a
18
+ six-beat loop (Phase 1).** The shopper's behaviour store is recast: the
19
+ `profile.json` manifest and the `domain_spec`/`intent_spec`/`playbook` triple
20
+ are **deleted** (no backwards compatibility — old flat packs read `unreadable`),
21
+ replaced by a filesystem-scanned layout `shopper/{user_spec.md,
22
+ domains/<slug>/{method.md, prds/<product>-<intent>.md, assets/}}` where each
23
+ file's own frontmatter IS the source of truth. Discovery is a scan, not an index
24
+ read; a file with malformed frontmatter is skipped and surfaced as `unreadable`,
25
+ never half-read. `sil_profile_materialize` is now **setup-only** (it writes the
26
+ shared `user_spec.md`, its frontmatter carrying the shopper name, and mints no
27
+ domain); `sil_profile_get` / `sil_profile_remove` take `domainSlug` + optional
28
+ `prd` selectors (read one body / remove a whole domain or one PRD). The bundled
29
+ `sil-shopping` skill is rewritten as the **six-beat** loop — classify → method →
30
+ fill → search-space → reflect → feedback — across new `references/shop_loop.md`,
31
+ `method_and_prds.md`, and `fill_and_feedback.md` (the `manage_domains.md` /
32
+ `refine_shopper.md` references are retired).
33
+ - **`sil_search` forwards an open-vocabulary `specs` predicate list and returns
34
+ observable `specs_status` (Phase 2, #55).** Pure transport, no client-side
35
+ matching: the plugin passes typed predicates (`{ ns, key, op, value, unit?,
36
+ hard? }`) under one namespaced `filters.specs` key and surfaces the backend's
37
+ per-predicate `specs_status` (`{ ns, key, applied }[]`, a sibling of `products`)
38
+ for Beat 5's hard-constraint honesty pass. An unindexed key **fails green**
39
+ (`applied: false`) — never dropped, never a fabricated `applied: true` — and
40
+ converges as the spec registry populates.
41
+
42
+ ### Added
43
+
44
+ - **`sil_learn` — one `target + change` write verb (5 kinds).** Replaces
45
+ `sil_remember`: `create` mints a whole method/PRD; `append` / `amend` / `retract`
46
+ refine a section-aware markdown body in place (single-occurrence match,
47
+ fail-closed); `attach-asset` persists image bytes into the domain's `assets/`
48
+ (owner-only, content-hashed) and links them by relative path. Targets
49
+ `user_spec` / `method` / `prd`; `hard` marks an inviolable constraint on
50
+ `user_spec`/`prd` appends.
51
+ - **`sil_profile_search` — the frontmatter-as-truth discovery tool.** Queries
52
+ artefact frontmatter and returns coordinates only (domains + PRDs, no bodies) —
53
+ the reuse-before-mint primitive that replaces the deleted manifest's index role;
54
+ malformed artefacts surface in an observable `unreadable[]`, never silently
55
+ dropped. Tool floor 8 → 9.
56
+ - **`sil_specs` — the spec-registry canonicalize-or-create tool (Phase 3, #57).**
57
+ The shopping method's Beat-2 mint submits the coined spec DEFINITIONS it invents
58
+ for a niche (`{ namespace, key, display_name, data_type, unit?, allowed_values?,
59
+ description? }`); each resolves 1:1 to a canonical name — **matched** an existing
60
+ spec (adopt its `canonical` `{ namespace, key }`, drop the coined synonym) or
61
+ **created** as new (yours is canonical going forward) — so the `filters.specs`
62
+ vocabulary converges across methods. Shares `sil_search`'s taxonomy (401
63
+ refresh-and-retry-once, `not_registered` / `forbidden` / `invalid_request` /
64
+ `retryable`) and degrades gracefully: a non-`ok` verdict never blocks the mint,
65
+ which proceeds with the raw coined names. Tool floor 9 → 10.
66
+
67
+ ### Removed
68
+
69
+ - **`sil_remember`** (renamed to `sil_learn` — no alias) and the `profile.json`
70
+ manifest machinery. The two operator bins now read the singleton from the
71
+ `user_spec.md` frontmatter, not the manifest.
72
+
73
+ ## [0.3.9] - 2026-07-10
74
+
75
+ ### Added
76
+
77
+ - **A new shopper is auto-bound to the current channel — fail-open, verified.**
78
+ Creation grew a final bind beat: `resolveBindChannel` picks the channel
79
+ (`spec.channel` > `OPENCLAW_MCP_MESSAGE_CHANNEL` > none), and
80
+ `create-shopper.mjs` binds the freshly-minted shopper to it and **verifies the
81
+ bind from the host's own JSON** before declaring success (the `created` outcome
82
+ now carries `boundChannel`). The bind is **fail-open**: a bind or verify
83
+ failure never fails the create and never leaves a half-bound agent — it
84
+ self-reverts and returns a manual-bind hint naming the shopper and the exact
85
+ step to run. No channel resolvable is a clean no-op, not an error. (#48)
86
+ - **`SKILL.md` is now stage-aware and gates the shopper's search on a learned
87
+ domain.** The always-loaded router reads two live signals — registration
88
+ (`sil_whoami`) and shopper state (the no-arg `sil_profile_get` overview) — and
89
+ presents a **five-stage onboarding progression** while setup is incomplete,
90
+ then **sheds to usage-only** once complete, so a steady-state session isn't
91
+ taxed with setup prose. When acting *as the shopper*, search is gated behind a
92
+ learned domain (classify → learn-on-miss before any `sil_search`); the
93
+ profile-less **Lane 1 bare search stays untouched**. Prose-only — no tool
94
+ change, `contracts.tools` byte-unchanged. (#49)
95
+
96
+ ### Changed
97
+
98
+ - **The `sil-shopping` skill bundle was refactored to progressive disclosure and
99
+ de-rigidified** — same SDS state machine and file-creation flow, leaner and
100
+ more legible. The one-time onboarding script was **evicted from the
101
+ always-loaded `SKILL.md`** into `references/setup_onboarding.md` (loads on
102
+ demand, shed once setup completes); the router collapses to a **pure state
103
+ branch** (no identity / no shopper / shopper) — body **2394 → 1042 words
104
+ (−56%)**, description **917 → 622 chars**. Language firmness was then matched to
105
+ the task: firm only at the genuine cliffs (endorsement gate, singleton refusal,
106
+ confirm-before-remove/persist, hard-constraint reject-at-pick,
107
+ re-fetch-before-buy, follow-the-tool's-recovery), plain heuristics everywhere
108
+ else. The **whole 10-file bundle** was rewritten leaner (**15,644 → 9,101
109
+ words, −41%**; `shop_loop` −56%): killed tool↔skill and cross-file duplication
110
+ and dropped the `sil_search` param-catalog table (the tool description owns it —
111
+ the mapping now points there). Skill prose + tests only; the 8-tool floor and
112
+ `contracts.tools` are unchanged. (#50, #51)
113
+
114
+ ### Fixed
115
+
116
+ - **The `sil-shopping` skill now actually loads into the created shopper agent.**
117
+ `create-shopper.mjs` attached the **plugin id** (`["sil"]`) at
118
+ `agents.list[i].skills`, but a skill attaches by its **published name** — the
119
+ skill-dir basename `sil-shopping` (`basename(openclaw.plugin.json#skills[0])`,
120
+ == the `SKILL.md` frontmatter `name`) — so the host looked up a skill named
121
+ `sil`, found none, and the shopper ran with **no skill driving its `sil_*`
122
+ tools**. The `["sil"]` literal is deleted; the attach value is now
123
+ **single-sourced from the shipped manifest** and resolved as a fail-closed
124
+ precondition (a blank/absent `skills[0]` attaches nothing, never `[""]`). A
125
+ static name-agreement drift guard (`basename(skills[0]) == SKILL.md name !=
126
+ plugin id`) keeps the plugin-id/skill-name conflation from silently returning.
127
+ (#47)
128
+
13
129
  ## [0.3.8] - 2026-07-06
14
130
 
15
131
  ### Added
@@ -0,0 +1,10 @@
1
+ export function resolveBindChannel(sources) {
2
+ return normalizeChannel(sources.specChannel) ?? normalizeChannel(sources.envChannel);
3
+ }
4
+ /** A present, non-blank string trimmed of surrounding whitespace, else `null`. */
5
+ function normalizeChannel(value) {
6
+ if (typeof value !== "string")
7
+ return null;
8
+ const trimmed = value.trim();
9
+ return trimmed.length > 0 ? trimmed : null;
10
+ }